1. Technical Field
The present invention relates to data processing systems. In particular, the invention relates to a system and method of operating a virtual memory system for a computer to provide efficient shared memory.
2. Description of the Related Art
In the above-mentioned related application Ser. No. 472,364 a shared memory system is described which makes use of characteristics of the powerPC and its operating system, and the concepts therein are applicable also to other architectures such as the Intel i386 or i486 as described herein.
Previously, shared memory in a virtual memory management system has been provided by page aliasing. Each virtual mapping of a shared physical page required individual kernel structures and hardware page table entry resources. Such an arrangement amounts to a very large redundant overhead in a system, such as OS/2 and OS/2 for the powerPC (or a workplace operating system), that relies heavily on shared memory. In such a system, any change to the shared memory attributes would require that each mapping be modified individually, resulting in a heavy performance penalty.
Some virtual memory systems provide the feature of a shared memory band that appears at the same address in each address space; in contrast, the system described herein uses the creation of an independent address space that can be attached at any address selectively.
It is noted that the system described herein involves the creation of and sharing of an address space; an address space is like a container for memory objects. Many other shared memory schemes only deal with sharing memory objects. Sharing a memory object allows modifications by one task to be seen by multiple tasks. Sharing an address space allows modifications to the address space, such as creating and destroying of memory objects and changes to the attributes of the memory object, such as protection changes, to be seen by multiple tasks by performing the operation only to the shared address space.
On an Intel i386 architecture, typically the use of shared memory with multiple tasks would result in the directory page in each address space pointing to a page table page that would each contain a page table entry referring to the same physical page; and change to the access of this page, such as changing the access protection, would require all page table entries to be modified. According, an efficient data structure organization to manage page table pages to emulate powerPC virtual segment IDs to provide shared memory, is provided by this invention.